﻿@model App.Web.ViewModels.FeedbackViewModel

@{
	String pageTitle = "Send Feedback";    
    ViewBag.Title = Html.GetPageTitle(pageTitle);
    bool _HasSent = ViewData[AppConstants.ViewDataKeys.HAS_ACTIVATED] == null ? false : Convert.ToBoolean(ViewData[AppConstants.ViewDataKeys.HAS_ACTIVATED]);
}
@Html.JavaScript("jquery.validate.min.js", Url)
@Html.JavaScript("jquery.validate.unobtrusive.min.js", Url)

<div class="page-heading">
    <h1>@pageTitle</h1>
    <div>
        Send your feedback directly to the BdMarket24 team.        
    </div>
</div>

<div class="GroupBox">
@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

	if (Model == null)
    {
        @: @Html.ErrorMessageBox("Sorry! Requested Feedback was not found for edit.")
    }
	else
	{
        if (ViewData[AppConstants.ViewDataKeys.HAS_ACTIVATED] != null)
        {
            if (_HasSent)
            {
                @: @Html.InfoMessageBox("Your Feedback has sent succussfully.")            
            }
            else
            {
                @: @Html.ErrorMessageBox("Unable to Send your Feedback. There was an error in the SMTP Server.")
            }
        }
		
		@*<div class="GroupHeaderOverlay" style="width:140px;">Feedback Information</div>*@    

		<div class="editor-label">
			@Html.LabelFor(model => model.Name)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.Name)
			@Html.ValidationMessageFor(model => model.Name)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.Email)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.Email)
			@Html.ValidationMessageFor(model => model.Email)
		</div>
        <div class="editor-label">
			@Html.LabelFor(model => model.Subject)
		</div>
		<div class="editor-field">
			@Html.EditorFor(model => model.Subject)
			@Html.ValidationMessageFor(model => model.Subject)
		</div>
		<div class="editor-label">
			@Html.LabelFor(model => model.Message)
		</div>
		<div class="editor-field">
			@Html.TextAreaFor(model => model.Message)
			@Html.ValidationMessageFor(model => model.Message)
		</div>			
		<div>
			<input type="submit" value="Send" />
		</div>		
    }
}
</div>

